{% extends "setting.html" %}

{% block title %} admin - compose {% end %}

{% block body %}
<div class="aeCompose">
  <form method="post" action="">
	<div class="row">
	  <label>Sitename</label><input type="text" name="sitename" value="" />
	</div>
	<div class="row">
	  <label>URI</label><input type="text" name="uri" value="" />
	</div>
	<div class="row">
	  <label>Comment</label><textarea name="comment" rows="10" style="clear:right;"></textarea>
	</div>
	<div class="hr">
	  <input type="submit" name="submit" value="Add" />
	</div>
	<div class="hr"></div>
	{{ xsrf_form_html() }}
  </form>
</div>

<hr />

<div class="aePosts">
  <h2>Links</h2>
  <table width="100%" cellspacing="0" cellpadding="5" border="0" class="data">
	<thead>
	  <tr>
		<td>title</td><td></td><td></td>
	  </tr>
	</thead>
	<tbody>
	  {% for l in links %}
	  <tr onmouseover="mover(this)" onmouseout="mout(this)">
		<td><a href="http://{{ l['val'] }}">{{ l['key'] }}</a></td>
		<td>{{ l['comment'] }}</td>
		<td>
		  <a href="javascript:void(0)" class="btn"> Edit </a>
		  <a href="javascript:void(0)" class="btn"> Delete </a>
		</td>
	  </tr>
	  {% end %}
	</tbody>
  </table>
</div>


{% end %}

{% block initscript %}

function mover(ob){
$(ob).css('background-color',"#EEE");
}

function mout(ob){
$(ob).css('background-color',"#FFF");
}
function top(pid){
alert(pid);
}

function del(pid){

}
{% end %}
